<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <div class="breadcrumb_wrap">
        <ul class="breadcrumb">
            <li>您的位置：</li>
            <li> <a href="product_list.html">产品管理</a> <span class="divider">></span> </li>
            <li> <a href="product_list.html">产品信息</a> <span class="divider">></span> </li>
            <li class="active">列表</li>
        </ul>
    </div>
    <ul id="myTab" class="nav nav-tabs pro_nav_tabs">
        <li class="active"> <a href="/xdd/common/goods_list" >产品信息</a> </li>
        <li> <a href="/xdd/common/goods_price">单价维护</a> </li>
    </ul>
    <div class="select_box " >
        <form class="form-horizontal" role="form">
            <div class="form-group col-md-4">
                <label class="control-label">产品名：</label>
                <input type="text" class="form-control" ng-model="goodsParam.title">
            </div>
            <div class="form-group col-md-4">
                <label class="control-label">产品分类：</label>
                <select class="form-control" ng-model="goodsParam.typeOne" ng-change="getChildType('1')">
                    <option value="">--请选择--</option>
                    <option ng-repeat="type in typeOneList" value="{{type.id}}">{{type.title}}</option>
                </select>
            </div>
            <div class="form-group col-md-4">
                <label class="control-label">成色：</label>
                <select class="form-control" ng-model="goodsParam.type" ng-change="getChildType('2')" >
                    <option value="" disabled selected>--请选择--</option>
                    <option ng-repeat="type in typeList" value="{{type.id}}">{{type.typeName}}</option>
                </select>
            </div>
            <div class="form-group col-md-4">
                <label class="control-label">产品样式：</label>
                <select class="form-control" ng-model="goodsParam.gstyle" ng-change="getPxByStyle()">
                    <option value="" disabled selected >--请选择--</option>
                    <option ng-repeat="style in gstyleList" value="{{style.id}}">{{style.typeName}}</option>
                </select>
            </div>
            <div class="form-group col-md-4">
                <label class="control-label">产品品型：</label>
                <select class="form-control" ng-model="goodsParam.px">
                    <option value="" disabled selected >--请选择--</option>
                    <option ng-repeat="px in pxList" value="{{px.id}}">{{px.title}}</option>
                </select>
            </div>


            <div class="form-group col-md-4">
                <label class="control-label">产品状态：</label>
                <select class="form-control" ng-model="goodsParam.status">
                    <option value="">--请选择--</option>
                    <option value="1">已上架</option>
                    <option value="0">未上架</option>
                </select>
            </div>

            <div class="form-group col-md-4 button_box ">
                <button type="button" ng-click="searchGoodsList()" class="btn btn-primary" ><i class="glyphicon glyphicon-search"></i>搜索</button>
            </div>
        </form>
    </div>
    <div class="button_box table_btn_box">
        <a href="/xdd/common/goods_add"><button type="button" class="btn btn-primary btn_add"><i class="glyphicon glyphicon-plus"></i>新增</button></a>
        <button type="button" class="btn btn-primary btn_copy" ng-click="copyGoods()"><i class="glyphicon glyphicon-plus"></i>复制</button>
        <button type="button" class="btn btn-primary del" ng-click="grounding(1)">批量上架</button>
        <button type="button" class="btn btn-primary" ng-click="undercarriage(0)">批量下架</button>
        <button type="button" class="btn btn-primary" ng-click="review()">批量审核</button>
    </div>
    <div class="table-responsive con_list">
        <table class="table table-striped">
            <thead>
            <tr>
                <th style="text-align:center;width: 2px;"><input type="checkbox" class="ng-valid ng-dirty" ng-model="allChecked"></th>
                <th>产品名称</th>
                <th>产品编号</th>
                <th>单价（元/g)</th>
                <th>商品类型</th>
                <th>成色</th>
               <!-- <th>产品样式</th>-->
                <th>商品品型</th>
                <th>商品状态</th>
                <th>审核状态</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="goods in goodsList">
                <td style="text-align: center"><input type="checkbox" value="{{goods.id}}" name="goodsId" ng-checked="allChecked"></td>
                <td><a href="/xdd/common/goodsDetail/{{goods.id}}" target="_blank">{{goods.title}}</a></td>
                <td>{{goods.identifier}}</td>
                <td>{{goods.price}}元/g</td>
                <td>{{goods.typeOneName}}</td>
                <td>{{goods.typeName}}</td>
                <!--<td>{{goods.gstyleName}}</td>-->
                <td>{{goods.pxName}}</td>

                <!--<td>{{goods.status==1?'已上架':'未上架'}}</td>-->
                <td  ng-if="goods.status==1"><span class="state"> 已上架</span></td>
                <td  ng-if="goods.status==0"> <span class="state down"> 已下架</span></td>
                <!--<td>{{goods.checkStatusName}}</td>-->
                <td ng-if="goods.checkStatus==0"><span class="state down"> {{goods.checkStatusName}}</span></td>
                <td ng-if="goods.checkStatus==1"><span class="state"> {{goods.checkStatusName}}</span></td>
                <td ng-if="goods.checkStatus==2"><span class="state fail"> {{goods.checkStatusName}}</span></td>
                <td class="ops">
                    <!--<a href="/xdd/common/goodsDetail/{{goods.id}}"><button type="button" class="btn btn-primary">查看</button></a>-->
                   <!-- <button ng-if="goods.status==1" class="btn btn-primary del" ng-click="updateStatus(goods,0)">下架</button>
                    <button ng-if="goods.status==0" class="btn btn-primary" ng-click="updateStatus(goods,1)">上架</button>
                    <button type="button" class="btn btn-primary examine" ng-click="reviewGoods(goods)">审核</button>-->
                    <a href="/xdd/common/goodsUpdate/{{goods.id}}" target="_blank"><button type="button" class="btn btn-primary editor">修改</button></a>
                    <button type="button" class="btn btn-primary del" ng-click="deleteGoods(goods.id)">删除</button></td>
            </tr>
            </tbody>
        </table>
    </div>
    <div class="page_wrap">
        <div class="text-center scott">
            <uib-pagination  total-items="totalItems" ng-model="currentPage" boundary-links="true" max-size="5"   ng-change="pageChanged()" items-per-page="itemsPerPage" previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></uib-pagination>
        </div>
    </div>
</div>